// 这个是用来干嘛的 就是给表单提供数据的
import { reactive } from 'vue'
import { TaskAdd } from '@/api/ReviewBusiness/01Project/projectType'
export default function useBaseModel() {
  const rules = reactive({
    name: [{
      required: true,
      message: '请填写任务名称',
      trigger: 'blur',
    }],
    taskBaseline: [{
      required: true,
      message: '请填写基线名称',
      trigger: 'blur',
    }],
    taskType: [{
      required: true,
      message: '请选择任务类型',
      trigger: 'change',
    }],
    stages: [{
      required: true,
      message: '请选择阶段',
      trigger: 'change',
    }],
    endTime: [{
      required: true,
      message: '请选择结束时间',
      trigger: 'change',
    }],

  })
  const dialogModel = reactive<TaskAdd>({
    name: '',
    taskBaseline: '',
    taskType: '',
    remark: '',
    stages: [],
    endTime:''
  })
  return {
    rules, dialogModel
  }
}